#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    int max = 0;
    int c2 = 0;
    int c3 = 0;
    int sum = 0;
    int tmp;
    while (n--)
    {
        scanf("%d", &tmp);
        if (tmp % 3 == 0)
            max = (max > tmp) ? max : tmp;
        if ((tmp - 1) % 3 == 0)
            c2++;
        if ((tmp - 2) % 3 == 0)
        {
            c3++;
            sum += tmp;
        }
    }
    if (!max)
        printf("None\n");
    else
        printf("%d\n", max);
    if (!c2)
        printf("None\n");
    else
        printf("%d\n", c2);
    if (!c3)
        printf("None\n");
    else
        printf("%.1f\n", (double)sum / c3);
    return 0;
}